package com.jiahe.yehua.order.service;

import com.atguigu.yygh.model.order.OrderInfo;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import com.atguigu.yygh.vo.order.OrderQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @author 阿良
 * @version 1.0
 * @date 2021/9/11 14:01
 */

public interface OrderService extends IService<OrderInfo> {
    /**
     * 保存订单
     * @param scheduleId
     * @param patientId
     * @return
     */
    Long saveOrder(String scheduleId, Long patientId);

    /**
     * 根据订单id查询订单详情
     * @param orderId
     * @return
     */
    OrderInfo getOrder(String orderId);

    /**
     *
     * @param orderInfo
     * @return
     */
    OrderInfo packOrderInfo(OrderInfo orderInfo);

    /**
     * /取消预约
     * @param orderId
     * @return
     */
    Boolean cancelOrder(Long orderId);

    /**
     * 分页列表
     * @param pageParam
     * @param orderQueryVo
     * @return
     */
    IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo);


    /**
     * 就诊提醒
     */
    void patientTips();

    /**
     * 获取订单统计数据
     * @param orderCountQueryVo
     * @return
     */
    Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo);
}
